﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Veteran_cms.Models.HomeAdminListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>
<div class="widget">
    <div class="title">
        <span class="titleIcon">
            <input type="checkbox" id="titleCheck" name="titleCheck" /></span><h6>
                Danh sách tag</h6>
        <div style="float: right">
            <a href="<%=Url.Action("Create","ManageTag") %>" title="" class="button greyishB"
                style="margin: 5px;">
                <img src="../../images/adminSite/icons/light/create.png" alt="" class="icon" /><span>THÊM
                    MỚI</span></a></div>
    </div>
    <table cellpadding="0" cellspacing="0" width="100%" class="sTable withCheck mTable"
        id="checkAll">
        <thead>
            <tr>
                <td>
                    <img src="../../images/adminSite/icons/tableArrows.png" alt="" />
                </td>
                <td style="width: 80%" class="sortCol">
                    <div>
                        Tên tag<span></span></div>
                </td>
                <td>
                    Chức năng
                </td>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <td colspan="6">
                    <div class="tPagination">
                        <%if (Model != null)
                          { %>
                        <%=Ajax.Pager(Model.TagPageInfo.CurrentPage, Model.TagPageInfo.TotalItems, "TagList", 0, Model.TagPageInfo.ItemsPerPage, "Paging")%>
                        <%} %>
                    </div>
                </td>
            </tr>
        </tfoot>
        <tbody>
            <%if (Model.Tags != null)
              {
                  foreach (var item in Model.Tags)
                  {%>
            <tr>
                <td>
                    <input type="checkbox" id="titleCheck2" name="checkRow" />
                </td>
                <td>
                    <a href="<%=Url.Action("Details", "ManageTag", new {id = item.tag_id}) %>" title="">
                        <%=item.tag_text%></a>
                </td>
                <td class="actBtns">
                    <a href="<%=Url.Action("Details", "ManageTag", new {id = item.tag_id}) %>" title="Cập nhật"
                        class="tipS">
                        <img src="../../images/adminSite/icons/dark/pencil.png" alt="" /></a> <a href="<%=Url.Action("Delete", "ManageTag", new {id = item.tag_id}) %>"
                            title="Xóa" class="tipS">
                            <img src="../../images/adminSite/icons/uploader/deleteFile.png" alt="" onclick="return ConfirmDelete()" /></a>
                </td>
            </tr>
            <%}
              }%>
        </tbody>
    </table>
</div>
